feat(web): add a public /download page for the desktop client - #87
Merged
Conversation
Lists the desktop installers straight from the GitHub Releases API, grouped by platform with architecture detection and the visitor's own platform highlighted. Filters releases on the desktop-v tag prefix rather than using /releases/latest. The repo publishes two unrelated series from one tags list — v1.3.0 (the app) and desktop-v* (this client) — and /releases/latest returns the newest of either, so it hands back the app release and would point every download button at the wrong artifact. "No desktop build published yet" is kept distinct from "could not reach GitHub", so a failed fetch can never render as an empty catalogue. Adds /download to AUTH_PUBLIC_PATHS in both client.js and useAuth.jsx. Without it, useAuth's mount effect redirects any non-allowlisted path to /login when there is no session — bouncing exactly the logged-out visitors the page exists for. The page uses fetch rather than lib/api/client.js on purpose: that module is the DeepSQL backend's axios layer (auth headers, refresh, error envelope), none of which applies to a third-party public API, and the page must work with no session and a down backend. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a public
/downloadpage listing the DeepSQL Desktop installers, read live from the GitHub Releases API and grouped by platform with architecture detection.Why the tag-prefix filter matters
The repo publishes two unrelated release series from one tags list:
v1.3.0(the DeepSQL app) anddesktop-v*(the desktop client)./releases/latestreturns the newest of either, so today it returnsv1.3.0— a naive download page would point every button at the wrong artifact. The page filters on thedesktop-vprefix instead.Public route
/downloadis added toAUTH_PUBLIC_PATHSin bothsrc/lib/api/client.jsandsrc/hooks/useAuth.jsx. Without it,useAuth's mount effect redirects any non-allowlisted path to/loginwhen there is no session — bouncing exactly the logged-out visitors this page exists for.The page uses
fetchrather thanlib/api/client.jsdeliberately: that module is the backend's axios layer (auth headers, refresh, error envelope), none of which applies to a third-party public API, and the page must work with no session and a down backend.Honest empty states
"No desktop build published yet" is kept distinct from "could not reach GitHub", so a failed fetch can never render as an empty catalogue.
Verification
desktop-v*release exists yet.v1.3.0, selectsdesktop-v1.0.0, groups mac/windows/linux, labels Apple Silicon vs Intel/AMD64, highlights the detected platform, and shows the unsigned-macOS first-launch note.npm run buildpasses; eslint reports 0 errors on changed files.Not included
There are currently no downloadable assets — the
desktop-v1.0.0tag failed to build on all three platforms. The fix for that is a separate commit that cannot be pushed with the current token (.github/workflowsneeds theworkflowOAuth scope); it will follow in its own PR.🤖 Generated with Claude Code